package com.ibeetl.admin.core.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.util.ValidateConfig;
import org.beetl.sql.core.annotatoin.AutoID;
import org.beetl.sql.core.annotatoin.SeqID;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.util.Date;

/*
*   用户实体
*
*/

public class CoreUser extends BaseEntity {

	@NotNull(message = "ID不能为空", groups = ValidateConfig.UPDATE.class)
	@SeqID(name = ORACLE_CORE_SEQ_NAME)
	@AutoID
	protected Long id;

	// 登录名，编号
	@NotBlank(message = "用户编号不能为空", groups = ValidateConfig.ADD.class)
	@Null(message = "用户编号不能为空", groups = ValidateConfig.UPDATE.class)
	private String code;

	// 密码
	@JsonIgnore
	private String password;

	//用户类型 0：后台用户，1 员工
	private Integer userType;

	//姓名
	private String userName;

	private String comName;
	//性别
	@Dict(type = "gender")
	private String sex;
	@Dict(type = "user_state")
	private String status;
	//身份证号
	private String idCard;

	//手机串号
	private String imei;

	//手机消息推送id
	private String clientid;

	//机构部门ID
	private Long orgId;
	private Long comId;

	private String img;

	// 授权角色id
	private Long roleId;

	private String idCardPositive;
	private String idCardOpposite;

	private String zizhi;
	private String shebao;
	private String zhichen;
	private Date youxiaoqi;

	public String getZhichen() {
		return zhichen;
	}

	public void setZhichen(String zhichen) {
		this.zhichen = zhichen;
	}

	public String getIdCardPositive() {
		return idCardPositive;
	}

	public void setIdCardPositive(String idCardPositive) {
		this.idCardPositive = idCardPositive;
	}

	public String getIdCardOpposite() {
		return idCardOpposite;
	}

	public void setIdCardOpposite(String idCardOpposite) {
		this.idCardOpposite = idCardOpposite;
	}

	public String getZizhi() {
		return zizhi;
	}

	public void setZizhi(String zizhi) {
		this.zizhi = zizhi;
	}

	public String getShebao() {
		return shebao;
	}

	public void setShebao(String shebao) {
		this.shebao = shebao;
	}

	public Date getYouxiaoqi() {
		return youxiaoqi;
	}

	public void setYouxiaoqi(Date youxiaoqi) {
		this.youxiaoqi = youxiaoqi;
	}

	public String getComName() {
		return comName;
	}

	public void setComName(String comName) {
		this.comName = comName;
	}

	public Long getComId() {
		return comId;
	}

	public void setComId(Long comId) {
		this.comId = comId;
	}

	public String getImg() {
		return img;
	}

	public void setImg(String img) {
		this.img = img;
	}

	public String getClientid() {
		return clientid;
	}

	public void setClientid(String clientid) {
		this.clientid = clientid;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Integer getUserType() {
		return userType;
	}

	public void setUserType(Integer userType) {
		this.userType = userType;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getIdCard() {
		return idCard;
	}

	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}

	public String getImei() {
		return imei;
	}

	public void setImei(String imei) {
		this.imei = imei;
	}

	public Long getOrgId() {
		return orgId;
	}

	public void setOrgId(Long orgId) {
		this.orgId = orgId;
	}


	public Long getRoleId() {
		return roleId;
	}

	public void setRoleId(Long roleId) {
		this.roleId = roleId;
	}


	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
}
